#!/usr/bin/env python
# encoding: utf-8
"""
GameListItemView.py

Created by Steve Streza on 2008-09-22.
Copyright (c) 2008 __MyCompanyName__. All rights reserved.
"""

import sys
import os
from Tkinter import *

class GameListItemView(Canvas):
        """a class to show a breaker guess and the maker feedback to it"""
        
	def __init__(self,master,breakerMove,makerMove,**kv):
                """constructor. breaker move is the guess to display
                   maker move is the feedback to display
                """
		Canvas.__init__(self,master,kv,height=48)
		self.set_breaker_move(breakerMove)
		self.set_maker_move(makerMove)
		pass
		
	def set_breaker_move(self,breaker):
		"""set the guess to display"""
		self.breakerMove = breaker
		pass
		
	def set_maker_move(self,maker):
		"""set the feedback to display"""
		self.makerMove = maker
		pass

	def update_view(self):
		"""refresh the this component"""
		width = 300
		height = 48
		
		self.delete(ALL)
		
		self.create_rectangle(0,0,width,height, fill="blue")
		
		pass
